home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 010 / blit.arc / LAYERS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1985-05-11  |  1.4 KB  |  64 lines

  1. /* src/layers.c @finen */
  2.  
  3. /*
  4.  * file:         layers.c
  5.  *
  6.  * sccs-id:      @(#)layers.c  1.2  85/03/24
  7.  *
  8.  * description: this file contains the one routine layers which
  9.  *              initialises the layers code.
  10.  *
  11.  * author:       simon kenyon.
  12.  *
  13.  * history:      sck  1.1  85/03/21  created.
  14.  *              sck   1.2  85/03/24  changed the include files around.
  15.  */
  16.  
  17. #include "layers.h"
  18.  
  19. struct layer  *toplayer;
  20. struct layer  *bottomlayer;
  21. struct bitmap *display;
  22. struct rectangle   disprect = {{
  23.        0, 0
  24. }, {
  25.    256, 256
  26. }
  27. };
  28.  
  29. /*
  30.  * name:         layers
  31.  *
  32.  * description: initialise my implementation of layers
  33.  *              as described in
  34.  *
  35.  *               acm transactions on graphics,
  36.  *              april 1983 - vol. 2, no. 2.
  37.  *
  38.  *              and also in
  39.  *
  40.  *              software - practice and experience,
  41.  *              february 1985 - vol. 15, no. 2.
  42.  *
  43.  * synopsis:     layers ()
  44.  *
  45.  * globals:      toplayer     (w)
  46.  *              bottomlayer   (w)
  47.  *              display       (w)
  48.  *              disprect      (r/w)
  49.  *
  50.  * calls:        balloc      (balloc.c)
  51.  *              background   (background.c)
  52.  *
  53.  * called by:    this is a top-level routine.
  54.  */
  55. layers ()
  56. {
  57.    struct bitmap   *balloc ();
  58.  
  59.    toplayer = null;
  60.    bottomlayer = null;
  61.    display = balloc (disprect);
  62.    (void) background (display -> bitmap_rect);
  63. }
  64.